DISTCARTESIAN
The DISTCARTESIAN
field specifier allows you to find documents that define a location that is within a specified distance from a specified point.
You can specify the document location using either a pair of fields (corresponding to X and Y coordinates), or a unified
TIP: If your document location field contains any shape other than a point, IDOL calculates distances from the geometric center of the shape.
Format
FieldText=DISTCARTESIAN{coordX,coordY,dist}:POSITION
coordX
|
The specified x coordinate. |
coordY
|
The specified y coordinate. |
dist
|
The distance in units from the specified x/y coordinates. |
POSITION
|
The document field or fields that contain the position value. You can use one of the following options to specify location fields:
You can specify multiple options for the location fields, in the form NOTE: If you use multiple position fields or field pairs, IDOL Content Component cannot match documents where a pair of split geospatial fields occurs interleaved with other geospatial fields. For example, if you use In such cases, you can rewrite the query, in the form |
NOTE: You can optimize this field specifier by configuring your coordinate fields with the
Examples
FieldText=DISTCARTESIAN{10,11,5}:X:Y
This example matches all documents whose (X,Y) position is within a distance of 5 units of the point (10,11). The position of a document in this example is contained in the fields X
and Y
.
FieldText=DISTCARTESIAN{10,11,5}:POSITION:X:Y
This example matches all documents whose (X,Y) position is within a distance of 5 units of the point (10,11). The position of a document in this example is contained in either the (unified) POSITION
field, or the separate X
and Y
fields.